// pages/play/play.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        shouboolen: false,
        // info:{
        name: "张三",
        number: 18679401622,
        address: "江西省抚州市临川区翰林府邸小区2栋三单元",
        // },
        customItem: '全部',
        totalMoney: "",

        arrlist: [{
                id: 1,
                content: "购物车",
            },
            {
                id: 2,
                content: "确认订单",
            },
            {
                id: 3,
                content: "支付",
            },
            {
                id: 4,
                content: "完成",
            },
        ]

    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
        console.log(options.id);
        this.setData({
            totalMoney: options.id,
        })
        console.log(this.data.totalMoney);



    },
    watchText(event) {
        console.log(event.detail.value);
        this.setData({
            name: event.detail.value
        })
        console.log(this.data.name);

    },
    getdianhua(event) {

        let reg = /^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/;
        if (reg.test(event.detail.value)) {
            this.setData({
                number: event.detail.value,
            })
            console.log(event.detail.value);
        } else {
            this.setData({
                shouboolen: true,
            })
        }



    },
    cuowu() {
        this.setData({
            shouboolen: false,
        })
    },
    getaddress(event) {
        console.log(event.detail.value);
        this.setData({
            address: event.detail.value
        })
    },
    qianwang() {
        this.getAll();
    },
    getAll() {
        let obj = {
            name: this.data.name,
            number: this.data.number,
            address: this.data.address,
        }
        console.log(obj);
        wx.setStorageSync("goodsplayAll", obj);


    },
    bindRegionChange: function (e) {
        console.log('picker发送选择改变，携带值为', e.detail.value)
        this.setData({
            region: e.detail.value
        })
    },

    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {

    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {

    },

    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {

    },

    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {

    },

    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {

    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {

    }
})